package com.ch.forum.dao;

import com.ch.forum.model.RewardModel;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface RewardMapper {

    @Insert("insert into t_reward(date,type,user_id,re_user_id,art_id,out_trade_no,price,status) " +
            "values(#{date},#{type},#{userId},#{reUserId},#{artId},#{outTradeNo},#{price},#{status})")
    void add(RewardModel model);

    @Update("update t_reward set status = 1 where id = #{id}")
    void update(@Param("id")Long id);
}
